From ac22e4f8b4f71d3e7d9775fc26fcb9013f339209 Mon Sep 17 00:00:00 2001 From: GMT 2000 Tony Gale Date: Tue, 21 Nov 2000 14:19:15 +0000 Subject: [PATCH] minor corrections Tue Nov 21 14:17:51 GMT 2000 Tony Gale * docs/tutorial/gtk-tut.sgml: minor corrections --- ChangeLog | 4 ++++ ChangeLog.pre-2-0 | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-2 | 4 ++++ ChangeLog.pre-2-4 | 4 ++++ ChangeLog.pre-2-6 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ docs/tutorial/gtk-tut.sgml | 40 ++++++++++++++++++++------------------ 8 files changed, 49 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c522fc7f1c..80f3da19ee 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Tue Nov 21 14:17:51 GMT 2000 Tony Gale + + * docs/tutorial/gtk-tut.sgml: minor corrections + 2000-11-20 Jonathan Blandford * gtk/gtktreemodelsort.h: Add convertion functions to let you convert to and from relative path's and iters. diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/gtk-tut.sgml index 20373f36e9..5a95946ebb 100755 --- a/docs/tutorial/gtk-tut.sgml +++ b/docs/tutorial/gtk-tut.sgml @@ -2,21 +2,21 @@ - July 21st 2000 + November 21st 2000 GTK+ 1.2 Tutorial - Tony - Gale + Tony + Gale - Ian - Main + Ian + Main This is a tutorial on how to use GTK (the GIMP Toolkit) through its C - interface. + interface. @@ -554,14 +554,14 @@ also be attached to these events. These events are: -In order to connect a callback function to one of these events, you +In order to connect a callback function to one of these events you use the function gtk_signal_connect, as described above, using one of the above event names as the name parameter. The callback function for events has a slightly different form than that for signals: -void callback_func( GtkWidget *widget, +gint callback_func( GtkWidget *widget, GdkEvent *event, gpointer callback_data ); @@ -569,7 +569,7 @@ void callback_func( GtkWidget *widget, GdkEvent is a C union structure whose type will depend upon which of the above events has occurred. In order for us to tell which event has been issued each of the possible alternatives has a type -parameter which reflects the event being issued. The other components +member that reflects the event being issued. The other components of the event structure will depend upon the type of the event. Possible values for the type are: @@ -1084,7 +1084,7 @@ This is where packing comes in. Theory of Packing Boxes -Most packing is done by creating boxes as in the example above. These +Most packing is done by creating boxes. These are invisible widget containers that we can pack our widgets into which come in two forms, a horizontal box, and a vertical box. When packing widgets into a horizontal box, the objects are inserted @@ -2290,7 +2290,7 @@ GtkWidget *gtk_radio_button_new_with_label( GSList *group, You'll notice the extra argument to these calls. They require a group to perform their duty properly. The first call to -gtk_radio_button_new_with_label or gtk_radio_button_new_with_label +gtk_radio_button_new or gtk_radio_button_new_with_label should pass NULL as the first argument. Then create a group using: @@ -2823,17 +2823,17 @@ Adjustment. The update policies, defined in are: -GTK_UPDATE_POLICY_CONTINUOUS - This is the default. The +GTK_UPDATE_CONTINUOUS - This is the default. The "value_changed" signal is emitted continuously, i.e., whenever the slider is moved by even the tiniest amount. -GTK_UPDATE_POLICY_DISCONTINUOUS - The "value_changed" signal is +GTK_UPDATE_DISCONTINUOUS - The "value_changed" signal is only emitted once the slider has stopped moving and the user has released the mouse button. -GTK_UPDATE_POLICY_DELAYED - The "value_changed" signal is emitted +GTK_UPDATE_DELAYED - The "value_changed" signal is emitted when the user releases the mouse button, or if the slider stops moving for a short period of time. @@ -5686,6 +5686,8 @@ pointer to the GList. glist = g_list_append(glist, "String 4"); gtk_combo_set_popdown_strings( GTK_COMBO(combo), glist) ; + + /* can free glist now, combo takes a copy */ The combo widget makes a copy of the strings passed to it in the glist @@ -9225,7 +9227,7 @@ void select_row_callback(GtkWidget *widget, gtk_signal_connect(GTK_OBJECT( clist), - "select_row" + "select_row", GTK_SIGNAL_FUNC(select_row_callback), NULL); @@ -10615,15 +10617,15 @@ standard File menu, with the options Open, gtk_menu_append (GTK_MENU (file_menu), quit_item); /* Attach the callback functions to the activate signal */ - gtk_signal_connect_object (GTK_OBJECT (open_items), "activate", + gtk_signal_connect_object (GTK_OBJECT (open_item), "activate", GTK_SIGNAL_FUNC (menuitem_response), (gpointer) "file.open"); - gtk_signal_connect_object (GTK_OBJECT (save_items), "activate", + gtk_signal_connect_object (GTK_OBJECT (save_item), "activate", GTK_SIGNAL_FUNC (menuitem_response), (gpointer) "file.save"); /* We can attach the Quit menu item to our exit function */ - gtk_signal_connect_object (GTK_OBJECT (quit_items), "activate", + gtk_signal_connect_object (GTK_OBJECT (quit_item), "activate", GTK_SIGNAL_FUNC (destroy), (gpointer) "file.quit"); @@ -15510,7 +15512,7 @@ such as: For information about the XInput extension, see the XInput-HOWTO. +url="http://www.gtk.org/~otaylor/xinput/howto/index.html">XInput HOWTO. If we examine the full definition of, for example, the GdkEventMotion structure, we see that it has fields to support extended device -- 2.30.2